﻿using JinKaiDataBasePlatform.Common.Helper;
using Newtonsoft.Json;
using RabbitMQ.Client;
using RabbitMQ.Client.Events;
using System;
using System.Text;
using Topshelf;

namespace SMS_Consumer_JinKaiDataBasePlatform
{
    class Program
    {
        static void Main(string[] args)
        {
                HostFactory.Run(x =>
                {
                    x.Service<SMS_Consumer>();
                    x.EnableServiceRecovery(r => r.RestartService(TimeSpan.FromSeconds(10)));
                    x.SetServiceName("SMS_Consumer");
                    x.StartAutomatically();
                }
            );
        }
    }
}
